<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <title>快乐拍宝</title>
    <link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/p/home/home_jingxuan.css">
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/index.js"></script>
    <script src="<?php echo TEMPLATE_SITE_URL;?>/zsm-static/_build/c/jquery.min.js"></script>
</head>
<body>
<!--    首页小导航-->
<?php $zh_menu='精选'?>
<?php include template('home/zsm/menu');?>
<div class="app jingxuandata">

</div>
<input type="hidden" name="haspage" value="1" id="haspage">
<input type="hidden" name="pagenum" value="0" id="pagenum">
<script type="text/javascript">
    $(function(){
        $(window).scroll(function () {
            var $body = $("body");
            if (($(window).height() + $(window).scrollTop()) >= $body.height()) {
                var haspage = parseInt($('#haspage').val());
                if(haspage=='0'){
                    return false;
                }
                var pagenum = parseInt($('#pagenum').val());
                var nextpage = eval(pagenum+1);
                ajaxdata(nextpage);
            }
        });
        function ajaxdata(nextpage){
            $.ajax({
                type:'get',
                url:'index.php?act=jingxuan&op=jingxuandata',
                data:{nextpage:nextpage},
                dataType:'html',
                success:function(html){
                    $('.loadNextPage').hide();
                    if(html==''){
                        $('#haspage').val('0');
                    }else{
                        $('#pagenum').val(nextpage);
                        $('.jingxuandata').append(html);
                    }
                }
            });
        }
        ajaxdata(1);
    });

</script>
<!--引入导航菜单与底部-->
<?php $zh_nav="首页";?>
<?php include template('home/zsm/nav');?>